﻿/*
This file is under Microsoft Public License (MS-PL)
Copyright Yohann MARTEL.  All rights reserved.
Codeplex: http://amf.codeplex.com
AMF Website: http://www.ymartel.com/aspnet-mobile-framework/
*/
using System.ComponentModel;
using System.Web.UI;

namespace Mobile.WebControls
{
    public class NavbarIconLink : NavbarLink
    {
        #region Properties
        [Category("Appearance")]
        public DataIcon Icon { get; set; }
        #endregion

        #region Methods
        protected override void CreateChildControls()
        {
            Li li = new Li();
            IconLink link = new IconLink();
            link.Text = Text;
            link.Url = Url;
            link.DataTransition = DataTransition;
            link.DataDirection = DataDirection;
            link.DialogBox = DialogBox;
            link.IsActive = IsActive;
            link.IsPersistent = IsPersistent;
            link.Icon = Icon;
            li.Controls.Add(link);
            Controls.Add(li);
        }
        #endregion

        #region Render Methods
        public override void RenderBeginTag(HtmlTextWriter writer)
        {
            AddAttributesToRender(writer);
        }

        public override void RenderEndTag(HtmlTextWriter writer)
        {
        }
        #endregion
    }
}
